#include <iostream>
#include <vector>
using namespace std;
vector<int> ans;
int m, n;
void slove(vector<int>& x, vector<int>& y) {
    int l = max(n, m);
    int k = 0;
    for(int i = 0; i < l; i++) {
        int ai = (i < m) ? x[i] : 0;
        int bi = (i < n) ? y[i] : 0;
        int t = k + ai + bi;
        ans.push_back(t % 10);
        k = t / 10;
    }
    if(k) {
        ans.push_back(k);
    }
}
int main() {
    vector<int> x, y;
    string a, b;
    cin >> a >> b;
    m = a.size(), n = b.size();
    for(int i = m - 1; i >= 0; i--) {
        x.push_back(a[i] - '0');
    }
    for(int i = n - 1; i >= 0; i--) {
        y.push_back(b[i] - '0');
    }
    slove(x, y);
    for(int i = ans.size() - 1; i >= 0; i--) {
        cout << ans[i];
    }
    return 0;
}